package com.spbdx.system.sysdict;


import com.spbdx.system.sysdict.support.DictCategory;
import com.spbdx.system.sysdict.support.DictionaryCategory;
import com.spbdx.system.sysdict.support.DictionaryCode;

/**
 * Description 审核类型
 *
 * @author chenwei
 * @version 1.0
 * @date 2023/3/14 10:14
 */
@DictionaryCategory(DictCategory.AUDIT_TYPE)
public enum AuditTypeEnum implements DictionaryCode {
    PASS("通过"),
    NOT_PASS("未通过"),
    WAIT_AUDIT("待审核");

    private String label;

    AuditTypeEnum(String label) {
        this.label = label;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getLabel(String code) {
        for (AuditTypeEnum statusEnum : AuditTypeEnum.values()) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum.getLabel();
            }
        }
        return "";
    }

    public static void main(String[] args) {
        AuditTypeEnum a = AuditTypeEnum.valueOf("pass");
        System.out.println(a);
    }
}
